import 'package:flutter/material.dart';
import 'package:im_module/model/ImUserInfoBean.dart';
import 'package:im_module/widget/ImHeadImageWidget.dart';

class UserInfoBodyWdiget extends StatelessWidget {
  ImUserInfoBean? _imUserInfoBean;

  UserInfoBodyWdiget(this._imUserInfoBean);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Padding(
          padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 25),
          child: Row(
            children: [
              ImHeadImageWidget(
                "${_imUserInfoBean?.faceurl}",
                width: 60,
                height: 60,
              ),
              Padding(
                padding: const EdgeInsets.only(left: 15),
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.start,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text(
                      "${_imUserInfoBean?.niceName}",
                      style: TextStyle(color: Color(0xff333333), fontSize: 24),
                    ),
                    SizedBox(
                      height: 8,
                    ),
                    Row(
                      children: [
                        Icon(Icons.phone_iphone,color: Color(0xff999999),size: 20,),
                        Text(
                          "${_imUserInfoBean?.phoneNumber}",
                          style: TextStyle(color: Color(0xff666666), fontSize: 16),
                        ),
                      ],
                    ),
                  ],
                ),
              )
            ],
          ),
        ),
        Divider(
          height: 0.5,
          indent: 15,
        ),
        ListTile(
          title: Text(
            "真实姓名",
            style: TextStyle(color: Color(0xff666666), fontSize: 15),
          ),
          trailing: Text(
            "${_imUserInfoBean?.userName}",
            style: TextStyle(color: Color(0xff333333), fontSize: 15),
          ),
        ),
        Divider(
          height: 0.5,
          indent: 15,
        ),
        ListTile(
          title: Text(
            "手机号",
            style: TextStyle(color: Color(0xff666666), fontSize: 15),
          ),
          trailing: Text(
            "${_imUserInfoBean?.phoneNumber}",
            style: TextStyle(color: Color(0xff333333), fontSize: 15),
          ),
        ),
        Divider(
          height: 0.5,
          indent: 15,
        ),
        ListTile(
          title: Text(
            "部门",
            style: TextStyle(color: Color(0xff666666), fontSize: 15),
          ),
          trailing: Text(
            "${_imUserInfoBean?.dept}",
            style: TextStyle(color: Color(0xff333333), fontSize: 15),
          ),
        ),
        Divider(
          height: 0.5,
          indent: 15,
        ),
        ListTile(
          title: Text(
            "角色",
            style: TextStyle(color: Color(0xff666666), fontSize: 15),
          ),
          trailing: Text(
            "",
            style: TextStyle(color: Color(0xff333333), fontSize: 15),
          ),
        ),
        Divider(
          height: 0.5,
          indent: 15,
        ),
      ],
    );
  }
}
